package com.mao.controller;

import com.mao.pojo.Order;
import com.mao.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 小毛同学
 * @version 1.0
 * @data 2022/3/4 15:16
 */
@RestController
@RequestMapping("order")
public class OrderController {

    @Autowired
    private OrderService orderService;

    @RequestMapping("{id}")
    public Order queryById(@PathVariable("id") int id){
        return orderService.queryById(id);
    }
}
